<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>消息通知组件</title>
    <link rel="icon" th:href="@{/images/favicon.ico}">
    <link rel="stylesheet" th:href="@{/layuimini/lib/layui-v2.6.3/css/layui.css}" media="all">
    <link rel="stylesheet" th:href="@{/layuimini/css/public.css}" media="all">
</head>
<body>
<div class="layuimini-container">
    <div class="layuimini-main">
        <div class="ok-body">
            <blockquote class="layui-elem-quote" style="padding: 5px;">
                1.layui第三方扩展组件：<font color="red" size="2">消息通知(notice)</font>；
                <a href="https://gitee.com/myttyy/layuinotice" target="_blank" class="layui-btn layui-btn-sm layui-btn-danger">notice</a><br>
                2.本项目主要用于各个功能CRUD操作响应结果提示信息，该组件主要显示消息图标和内容；
            </blockquote>

            <button type="button" class="layui-btn layui-bg-blue" id="notice">消息提示</button>
            <button type="button" class="layui-btn layui-bg-blue" id="notice2">成功提示</button>
            <button type="button" class="layui-btn layui-bg-blue" id="notice3">警告提示</button>
            <button type="button" class="layui-btn layui-bg-blue" id="notice4">错误提示</button>
            <button type="button" class="layui-btn layui-bg-blue" id="notice5">clear</button>
            <button type="button" class="layui-btn layui-bg-blue" id="notice6">remove</button>

            <pre>
			// Step1. 引入依赖
			let notice = layui.notice;
			<br/>
			// Step2. 使用
			$("#notice").click(function () {
				notice.success("消息提示");
			});
			$("#notice2").click(function () {
				notice.info("成功提示");
			});
			$("#notice3").click(function () {
				notice.warning("警告提示");
			});
			$("#notice4").click(function () {
				notice.error("错误提示");
			});
		</pre>
        </div>
    </div>
</div>
<!--  引入layui框架js文件-->
<script th:src="@{/layuimini/lib/layui-v2.6.3/layui.js}" charset="utf-8"></script>
<script th:src="@{/layuimini/js/lay-config.js?v=1.0.4}" charset="UTF-8"></script>
<script type="text/javascript" th:inline="javascript">
    layui.use(["code", "notice"], function () {
        let code = layui.code;
        let notice = layui.notice;
        let $ = layui.jquery;

        code({
            elem: "pre",
            title: "代码示例",
            skin:'notepad', //设置显示风格
            about: false
        });

        $("#notice").click(function () {
			notice.info("消息提示");
        });

        $("#notice2").click(function () {
			notice.success("成功提示");
		});

        $("#notice3").click(function () {
            notice.warning("警告提示");
        });

        $("#notice4").click(function () {
            notice.error("错误提示");
        });

        $("#notice5").click(function () {
            notice.clear();
        });

        $("#notice6").click(function () {
            notice.remove();
        });
    });
</script>
</body>
</html>
